package NonSingletonLab1;

public class Housebuilder {
	static House getHouse(String style) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
		House house = new House();
		HouseAbstractFactory factory = FactoryProducer.getFactory(style);
		house.setDoor(factory.buildDoor());
		house.setWall(factory.buildWall());
		house.setInterior(factory.buildInterior());
		house.setWindows(factory.buildWindows());
		house.setRoof(factory.buildRoof());
		return house;
	}

}
